package com.lianxi.Courses.service;

import com.github.pagehelper.PageInfo;
import com.lianxi.Courses.entity.CourseType;
import com.lianxi.Courses.exception.CourseExistException;
import com.lianxi.Courses.exception.CourseTypeExistException;
import com.lianxi.Courses.exception.RequestParameterErrorException;

import java.util.List;

public interface CourseTypeService {
    List<CourseType> findAll();
    void addCourseType(String name, Integer parentId)throws RequestParameterErrorException, CourseTypeExistException;
    PageInfo<CourseType> findPage(String pageNo, String pageSize);
    CourseType findById(String id) throws RequestParameterErrorException;
    void modifyName(String id,String name) throws RequestParameterErrorException,CourseTypeExistException;
    void modifyStatus(String id,String status) throws RequestParameterErrorException;
    List<CourseType> findByParentId(Integer parentId) throws RequestParameterErrorException;

    List<CourseType> findLeafTypes();


    PageInfo<CourseType> findPageByParentId(String pageNo, String pageSize, String parentId) throws RequestParameterErrorException;

    //找出最高级课程类型
    List<CourseType> findTopLevelTypes();









}
